<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .ball {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background-color: pink;
    }
    .ball-box {
      animation: moveX 1s linear infinite;
    }
    .ball {
      animation: moveY 1s cubic-bezier(0.55, 0, 0.85, 0.36) infinite;
    }
    .cart {
      margin-top: 200px;
      width: 300px;
      height: 40px;
      background-color: yellowgreen;
    }
    @keyframes moveX {
      to {
        transform: translateX(240px);
      }
    }
    @keyframes moveY {
      to {
        transform: translateY(240px);
      }
    }
  </style>
</head>

<body>
  <div class="ball-box">
    <div class="ball"></div>
  </div>
  <div class="cart"></div>
</body>

</html>